﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StaticPageMan.ascx.cs" Inherits="AdminX_StaticPages_StaticPageMan" %>
<%@ Register Src="../../Common/Alert.ascx" TagName="Alert" TagPrefix="uc1" %>
<%@ Register Assembly="Paging" Namespace="CutePager" TagPrefix="cc1" %>
<div>
    <uc1:Alert ID="Alert1" runat="server" />
</div>
    <div>
        <asp:Label ID="lblLanguage" runat="server" CssClass="text"  ></asp:Label>
        <asp:DropDownList ID="ddlLanguage" runat="server"   AutoPostBack="true"  CssClass ="boxnormal" OnSelectedIndexChanged="ddlLanguage_SelectedIndexChanged"   >
        </asp:DropDownList>
        <asp:Label ID="lblStatus" runat="server" Text ="Tình trạng" CssClass="text" ></asp:Label>
        <asp:DropDownList ID="ddlStatus" runat="server" CssClass ="boxnormal">
        
        </asp:DropDownList>
         <asp:Label ID="lblCategory" runat="server"  Text ="Page Group" CssClass="text"  Width="70px"></asp:Label>
    <asp:DropDownList ID="ddlCategory" CssClass="boxlong"  runat="server" >
    </asp:DropDownList>

        
    </div>
    <div>
    <asp:Label ID="lblKeyword" runat="server"  CssClass="text" ></asp:Label>
        <asp:TextBox ID="txtKeyword" runat="server" CssClass="boxlonger" MaxLength="200"></asp:TextBox>
        <asp:Button ID="btnSearch" runat="server" CssClass="Button" OnClick="btnSearch_Click"  />
    </div>
   
    <div style="text-align:right  "><asp:Button ID="btnAddnew" runat="server"  OnClick="btnAddnew_Click" /></div>
     <div><asp:Label ID="lblTotalRecord" runat="server" CssClass="text" Font-Bold="true"></asp:Label></div>
    <div>
         <asp:DataGrid ID="dtgPage" runat="Server" AutoGenerateColumns="False"  CellPadding="3"   
       CssClass="grdContainer"  BackColor="White"  BorderColor="#999999" BorderStyle="None" BorderWidth="1px" GridLines="Vertical" OnItemCommand="dtgPage_ItemCommand1" OnItemDataBound="dtgPage_ItemDataBound1" >
        <HeaderStyle CssClass="grdHeader" BackColor="#698DAD" Font-Bold="True" ForeColor="White"  />
        <AlternatingItemStyle CssClass="grdAlterItem" BackColor="#DCDCDC" />
        <ItemStyle CssClass="grdItem" BackColor="#EEEEEE" ForeColor="Black" />
        <EditItemStyle CssClass="grdEditItem" />
        <SelectedItemStyle CssClass="grdSelectItem" Font-Bold="True" BackColor="#008A8C" ForeColor="White" />
        <Columns>
                                    <asp:TemplateColumn  HeaderText="STT" >
                                        <HeaderStyle Width="30px" ></HeaderStyle >
                                        <ItemTemplate>
                                             <%# Container.ItemIndex + 1 %>
                                        </ItemTemplate>
                                    </asp:TemplateColumn> 
                                    <asp:TemplateColumn  HeaderText="Tên trang">
                                                                        
                                        <ItemTemplate>
                                        <div class="grdItemLeft" id="SearchAll" runat="server" >
                                        <span style="<%# CreateMarginLeft(DataBinder.Eval(Container.DataItem, HOLIZOTAL_COLUMN_NAME), int.Parse(DataBinder.Eval(Container.DataItem, "StaticPageID").ToString())) %>">
                                        <asp:Label ID="lblName" runat="server" ></asp:Label>
                                        
                                        </span>
                                        </div>
                                        <div class="grdItemLeft" id="NotSearchAll" runat="server">
                                        <b><asp:Label ID="lbl2ndName" runat="server"></asp:Label></b>
                                        </div>
                                       					        
                                        </ItemTemplate>
                                    </asp:TemplateColumn> 
                                      <asp:TemplateColumn  HeaderText="Mã trang">
                                         <HeaderStyle Width="150px"  ></HeaderStyle >
                                        <ItemTemplate>
                                            <asp:Label ID="lblPageCode" runat="server"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateColumn> 
                                    <asp:TemplateColumn  HeaderText="Ngày thay đổi">
                                         <HeaderStyle Width="100px"  ></HeaderStyle >
                                        <ItemTemplate>
                                            <asp:Label ID="lblDateModifined" runat="server"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateColumn> 
                                    
                                    <asp:TemplateColumn  HeaderText="Tình trạng">
                                         <HeaderStyle Width = "130px" ></HeaderStyle >
                                        <ItemTemplate>
                                          <asp:LinkButton ID="lnkActive" runat="server"  CommandName="Active" CausesValidation="false" ForeColor ="green"></asp:LinkButton>
                                          <asp:LinkButton ID="lnkInactive" runat="server"  CommandName="Inactive" CausesValidation="false" ForeColor="red"  ></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:TemplateColumn  HeaderText="Tùy chọn">
                                        <HeaderStyle Width="110px"  ></HeaderStyle >
                                        <ItemTemplate>
                                           <asp:LinkButton ID="lnkEdit" runat="server" ForeColor = "green" CommandName="Edit"></asp:LinkButton> &nbsp;&nbsp;
                                          <asp:LinkButton ID="lnkDelete" runat="server"  CommandName="Delete" CausesValidation="false" ForeColor="red"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                            </Columns>
                                <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" Mode="NumericPages" />
                        </asp:DataGrid>
    </div>
    <input id="hidSearchStatus" runat="server"  type="hidden" />
<div id="tblWarning" runat="server"  align="center" style="border:1px solid #A0A1A0; height: 25px; padding-top:5px;     ">
    <asp:Label ID="lblWarning" runat="server"  ForeColor="black" Font-Bold="true"     ></asp:Label>
</div>
<div align="right" style="width:100%; color: black">
    <cc1:pager id="Pager1" OnCommand="pager_Command"  runat="server"></cc1:pager>
</div>